const INITIAL_STATE = {
  isLoading: true,
  isLoadMore: true,
  data: {},
  dataMore: {},
  profile: {},
  users: {},
  integrals: {data:[]}
}

export default function goods (state = INITIAL_STATE, action) {
  switch (action.type) {
    case 'goods/list':
      return {
        ...state,
        ...action.payload,
      }
     case 'goods/listMore':
      return {
        ...state,
        ...action.payload,
      }
     case 'goods/profile':
       return {
         ...state,
         ...action.payload,
       }
     case 'goods/users':
       return {
         ...state,
         ...action.payload,
       }
     case 'goods/integrals':
       return {
         ...state,
         ...action.payload,
       }
     default:
       return state
  }
}
